#include<bits/stdc++.h>
using namespace std;
const int N=100010;
int n,r,maxn=-1;
int mon[N]={0};
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		scanf("%d",&r);
		if(r>=maxn){
			maxn=r;
		}
		mon[r]+=1;
	}
	for(int i=1;i<=maxn;i++){
		if(mon[i+1]<mon[i]){
			mon[i+1]=mon[i];
		}
	}
	cout<<mon[maxn+1];
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	return 0;
}
